n = int(input())
if n == 0:
    print("Invalid.")
else:
    a,b = 1,1
    for i in range(1,n+1):
        if i == 1 or i == 2:
            fibo = 1
        else:
            fibo = a + b
            b = a
            a = fibo      
        print("%11s" % fibo,end='')
        if i%5 == 0:
            print()